#include "StdAfx.h"
#include "User.h"

void CopyAuthInfo(AuthInfo* pDest, AuthInfo* pSrc)
{
	/*pDest->assip = pSrc->assip;
	pDest->cpip = pSrc->cpip;
	pDest->cpport = pSrc->cpport;
	pDest->cpsip = pSrc->cpsip;
	pDest->essip = pSrc->essip;
	pDest->mcflag = pSrc->mcflag;
	pDest->rank = pSrc->rank;
	pDest->token = pSrc->token;*/

	*pDest	= *pSrc;
}

CUser::CUser(DWORD dwID, LPCTSTR lpszUserName, LPCTSTR lpszPassword)
	: m_dwID(dwID)
	, m_strUserName(lpszUserName)
	,m_strPassword(lpszPassword)
{

}

CUser::CUser(USER_INFO UserInfo)
:m_dwID(UserInfo.dwID), m_strUserName(UserInfo.cUser), m_strPassword(UserInfo.cPassword)
{

}

CUser::~CUser(void)
{
}

void CUser::SetAuthInfo(AuthInfo& auth)
{
	CopyAuthInfo(&m_AuthInfo, &auth);

	m_strNameWithDomain = m_strUserName + _T("@") + m_AuthInfo.domain;
}